<template>
  <EleTableComp :config="config">
    <template v-slot:assAdd="slotData">
      <assAdd :data="slotData.data"></assAdd>
    </template>
    <template v-slot:judgelooks="slotData">
      <judge-look :data="slotData.data"></judge-look>
    </template>
  </EleTableComp>
</template>
<script>
import judgeLook from "./judgelook";
import assAdd from "./assAdd";
//import { typeJson } from "@/components/kits/plugins/config";
import { typeJson } from "@/components/EleTableComp/config";
export default {
  data() {
    return {
      config: {
        header: {
          breadcrumb: '',
          addButton: false,
          addButtonSlot: "assAdd", 
          search: [
            {
              type: "dropDown",
              value: "",
              prop: "levelName",
              list: typeJson.levelName,
              label: "风险等级",
            },
            {
              type: "netDropDown",
              prop: "judgmentType",
              value: "",
              label: "研判类型",
              list: {
                url: "/app/riskType/getList?",
                label: "name",
                value: "id",
                mineId: false,
                data: {},
              },
            },
          ],
          export: {
            url: "/app/riskinfo/export",
            method: "POST",
            mineId: true,
            currentPage: 1,
            pageSize: 10,
            filename: "风险研判",
            data: {},
          },
        },
        // backgroundColor: "type",
        table: [
          {
            type: "index",
            addEditHidden:true
          },
         
          {
            label: "研判类型",
            prop: "name",
            value: "",
            addEditHidden:true
          },
          {
            label: "研判内容",
            prop: "judgmentContent",
            value: "",
            addEditHidden:true
          },
          // {
          //   label: "研判依据",
          //   prop: "judgmentBasis",
          //   addEditHidden: true,
          //   value: "",
          // },
          // {
          //   label: "研判方法",
          //   prop: "judgmentWay",
          //   value: "",
          //   addEditHidden: true,
          // },

         
          {
            label: "管控措施",
            prop: "controlMeasures",
            value: "",
            addEditHidden:true
          },

          {
            label: "研判情况", 
            prop: "judgmentResults",
            value: "",
            addEditType: "textArea",
          },
           {
            label: "风险值(L)",
            prop: "ivalue",
            value: "",
            addEditHidden:true
          },
           {
            label: "风险值(E)",
            prop: "evalue",
            value: "",
            addEditHidden:true
          },
           {
            label: "风险值(C)",
            prop: "cvalue",
            value: "",
            addEditHidden:true
          },
          {
            label: "风险值(D)",
            prop: "totalValue",
            value: "",
            addEditHidden:true,
            backgroundColor: "type",
          }, 
          // {
          //   label: "等级名称",
          //   prop: "levelName",
          //   value: "",
          //   addEditHidden:true    
          // },  
          {
            label: "等级名称",
            prop: "level",
            value: "",
            addEditHidden:true    
          },  
         
          {
            label: "创建时间",
            prop: "createTime",
            value: "",
            addEditHidden:true 
          },

          {
            label: "操作",
            prop: "", // 传数据的时候 忽略
            type: "operation",
            addEditHidden: true,
            isParam: false,
            editjudge: true,
            deleteyp: true,
            look: false,
            slotName: ["judgelooks"],
            mineType: 1,
          },
        ],
        select: {
          url: "/app/riskinfo/getAllList",
          method: "POST",
          mineId: true,
          currentPage: 1,
          pageSize: 10,
          data: {},
        },
        update: {
            url: '/app/riskscore/insert',  
            method: '',
            data: this.form,
            mineId: true
          },
        delete: {
          url: "/app/riskscore/delete",
          method: "GET",
          id: -1,
        },
      },
    };
  },
  components: {
    judgeLook,
    assAdd,
  },
};
</script>
